﻿
namespace RoughHtml.w3c
{
    public abstract class Selector
    {
        /* simple selectors */

        /**
         * This is a conditional selector.
         * example:
         * <pre class="example">
         *   simple[role="private"]
         *   .part1
         *   H1#myId
         *   P:lang(fr).p1
         * </pre>
         *
         * @see ConditionalSelector
         */
        public static readonly short SAC_CONDITIONAL_SELECTOR = 0;

        /**
         * This selector matches any node.
         * @see SimpleSelector
         */
        public static readonly short SAC_ANY_NODE_SELECTOR = 1;

        /**
         * This selector matches the root node.
         * @see SimpleSelector
         */
        public static readonly short SAC_ROOT_NODE_SELECTOR = 2;

        /**
         * This selector matches only node that are different from a specified one.
         * @see NegativeSelector
         */
        public static readonly short SAC_NEGATIVE_SELECTOR = 3;

        /**
         * This selector matches only element node.
         * example:
         * <pre class="example">
         *   H1
         *   animate
         * </pre>
         * @see ElementSelector
         */
        public static readonly short SAC_ELEMENT_NODE_SELECTOR = 4;

        /**
         * This selector matches only text node.
         * @see CharacterDataSelector
         */
        public static readonly short SAC_TEXT_NODE_SELECTOR = 5;

        /**
         * This selector matches only cdata node.
         * @see CharacterDataSelector
         */
        public static readonly short SAC_CDATA_SECTION_NODE_SELECTOR = 6;

        /**
         * This selector matches only processing instruction node.
         * @see ProcessingInstructionSelector
         */
        public static readonly short SAC_PROCESSING_INSTRUCTION_NODE_SELECTOR = 7;

        /**
         * This selector matches only comment node.
         * @see CharacterDataSelector
         */
        public static readonly short SAC_COMMENT_NODE_SELECTOR = 8;
        /**
         * This selector matches the 'first line' pseudo element.
         * example:
         * <pre class="example">
         *   :first-line
         * </pre>
         * @see ElementSelector
         */
        public static readonly short SAC_PSEUDO_ELEMENT_SELECTOR = 9;

        /* combinator selectors */

        /**
         * This selector matches an arbitrary descendant of some ancestor element.
         * example:
         * <pre class="example">
         *   E F
         * </pre>
         * @see DescendantSelector
         */
        public static readonly short SAC_DESCENDANT_SELECTOR = 10;

        /**
         * This selector matches a childhood relationship between two elements.
         * example:
         * <pre class="example">
         *   E > F
         * </pre>
         * @see DescendantSelector
         */
        public static readonly short SAC_CHILD_SELECTOR = 11;
        /**
         * This selector matches two selectors who shared the same parent in the
         * document tree and the element represented by the first sequence
         * immediately precedes the element represented by the second one.
         * example:
         * <pre class="example">
         *   E + F
         * </pre>
         * @see SiblingSelector
         */
        public static readonly short SAC_DIRECT_ADJACENT_SELECTOR = 12;

        /**
         * An integer indicating the type of <code>Selector</code>
         */
        public abstract short getSelectorType();

    }
}
